<template>
  <div>
    <u-card title="恶意代码库" icon="bug" iconColor="#fdd9a2">
      <div
        style="height: 300px; font-size: 36px; justify-content: center"
        class="u-flex u-align-center"
      >
        <div>版本（VERSION）: V10.0.1</div>
        <div style="margin-left: 40px">更新日期：2024-04-26</div>
      </div>
    </u-card>
    <a-row :gutter="16" type="flex">
      <a-col :span="12" style="height: auto">
        <u-card title="最近一次扫描的时间：" icon="history" iconColor="#f97f69">
          <div
            style="height: 300px; font-size: 36px; justify-content: center"
            class="u-flex u-align-center button-text"
          >
            2024-04-26 18:06:31
          </div>
        </u-card>
      </a-col>
      <a-col :span="12" style="height: auto">
        <u-card title="样本分析的数量" icon="file" iconColor="#bd9ae2">
          <div
            style="
              height: 300px;
              font-size: 36px;
              justify-content: center;
              color: green;
            "
            class="u-flex u-align-center"
          >
            10
          </div>
        </u-card>
      </a-col>
    </a-row>
  </div>
</template>

<script>
import {
  todoListData,
  riskHostData,
  suspiciousData,
  securityEventData,
} from "@/config/main/data/app";

export default {
  data() {
    return {
      type: "a",
      todoListData,
      riskHostData,
      riskHostColumns: [
        {
          title: "主机名称",
          key: "host_name",
          scopedSlots: { customRender: "host" },
        },
        {
          title: "最新发现时间",
          dataIndex: "latest_discovery_time",
          key: "latest_discovery_time",
        },
        {
          title: "事件数量",
          key: "event_count",
          scopedSlots: { customRender: "count" },
        },
      ],
      suspiciousData,
      suspiciousColumns: [
        {
          title: "事件类型",
          dataIndex: "event_type",
          key: "event_type",
        },
        {
          title: "首次发现时间",
          dataIndex: "first_discovery_time",
          key: "first_discovery_time",
        },
        {
          title: "最新发现时间",
          dataIndex: "latest_discovery_time",
          key: "latest_discovery_time",
        },
        {
          title: "事件发生次数",
          key: "event_occurrence_count",
          scopedSlots: { customRender: "count" },
        },
        {
          title: "发生事件主机数",
          key: "host_count",
          scopedSlots: { customRender: "host" },
        },
      ],
      securityEventData,
      securityEventColumns: [
        {
          title: "事件类型",
          dataIndex: "event_type",
          key: "event_type",
        },
        {
          title: "最新发现时间",
          dataIndex: "latest_discovery_time",
          key: "latest_discovery_time",
        },
        {
          title: "发生次数",
          key: "event_count",
          scopedSlots: { customRender: "count" },
        },
      ],
      loading: false,
    };
  },
};
</script>

<style lang="scss">
.app-code .app-main {
  background: none;
  padding: 0;

  .u-card {
    margin-bottom: 20px;
    height: calc(100% - 20px);
  }

  .u-card-header {
    font-size: 24px;
  }
}
</style>
